package com.lesliefang.abcdisasm

import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.ui.Messages

/**
 * 测试用的简单Action，总是显示在菜单中
 */
class TestAction : AnAction() {

    override fun actionPerformed(e: AnActionEvent) {
        Messages.showInfoMessage(
            AbcDisasmBundle.message("dialog.test.message"),
            AbcDisasmBundle.message("dialog.test.title")
        )
    }

    override fun update(e: AnActionEvent) {
        // 总是显示这个菜单项
        e.presentation.isEnabledAndVisible = true
        e.presentation.text = AbcDisasmBundle.message("action.test.text")
        e.presentation.description = AbcDisasmBundle.message("action.test.description")
    }
}